package Work.Work1;

import java.util.Iterator;
import java.util.List;

/*
 *@Student 张策
 */
public class Main {
    public static void main(String[] args) {
        Dao<User> zc = new Dao<>();
        zc.save("123",new User("123","1号",20));
//        zc.update("46",new User("huan","1号",20));
//        zc.delete("123");
//        System.out.println(zc);
        List<User> list=zc.list();
        Iterator<User> iterator = list.iterator();
        while (iterator.hasNext()) {
            User next = iterator.next();
            System.out.println(next);
        }
    }
}
